var Utilities;
(function (Utilities) {
    function removeFirst(array, match) {
        for(var index = 0; index < array.length; ++index) {
            var candidate = array[index];
            if(match(candidate)) {
                array.splice(index, 1);
                break;
            }
        }
    }
    Utilities.removeFirst = removeFirst;
    function count(array, match) {
        var count = 0;
        for(var index = 0; index < array.length; ++index) {
            var candidate = array[index];
            if(match(candidate)) {
                ++count;
            }
        }
        return count;
    }
    Utilities.count = count;
})(Utilities || (Utilities = {}));

